#if !NETCOREAPP
using GameFramework.Network.MessagePack;
using GameFramework.Request;
#endif
using MessagePack;

namespace Server.Proto
{
    /// <summary>
    /// 重连请求
    /// </summary>
    [MessagePackObject(true)]
    public class ReconnectReq : RequestMessage
    {
        [IgnoreMember]
        public const int RouteKey = (int)RouteDefine.ReconnectReq;

        [IgnoreMember]
        public override int Route => RouteKey;
        
        /// <summary>
        /// 玩家角色唯一id
        /// </summary>
        public long RoleId { get; set; }
        
        /// <summary>
        /// 重连票据
        /// </summary>
        public string ReconnectToken { get; set; }

        public override void OnRecycle()
        {
            base.OnRecycle();
            RoleId = 0;
            ReconnectToken = string.Empty;
        }
    }
}